package com.iwhalecloud.bss.kite.cucc.service.pos.bo;

import java.util.List;

import com.iwhalecloud.bss.kite.manager.api.IQuerySceneInstService;
import com.iwhalecloud.bss.kite.manager.inst.change.KiteInstChange;
import com.iwhalecloud.bss.kite.manager.inst.change.KiteRelChange;
import com.ztesoft.bss.common.util.SpringUtil;

/**
 * <Description> <br>
 * 业务场景转单对象
 * 
 * @author XXZ<br>
 * @version 1.0<br>
 * @taskId <br>
 * @CreateDate 2020年12月21日 <br>
 * @since R9.0<br>
 * @see com.iwhalecloud.bss.kite.cucc.service.pos.bo <br>
 */
public class BcmcPosSceneBO extends com.iwhalecloud.bss.kite.service.ord.pos.handler.KitePosSceneBO {

    public void initPosData(String sceneInstId) {
        IQuerySceneInstService querySceneInstService = SpringUtil.getBean(IQuerySceneInstService.class);

        // 1.获取场景实例变动信息
        List<KiteInstChange> instChgs = querySceneInstService.listInstChanges(sceneInstId);

        // 2.获取场景关系变动实例信息
        List<KiteRelChange> instRelChgs = querySceneInstService.listRelChanges(sceneInstId);

        // 2. 组装产品实例对象
        super.packageAllProdInst(instChgs, instRelChgs);

        // 3. 组装主套餐实例对象
        super.packageAllMainOfferInst(instChgs, instRelChgs);

        // 4. 组装促销销售品实例对象
        super.packageAllPromotionOfferInst(instChgs, instRelChgs);

        // 5. 组装礼包实例对象
        super.packageAllGiftOfferInst(instChgs, instRelChgs);

        // 6.组装全部可选包对象
        this.packageAllAdditionalOfferInst(instChgs, instRelChgs);

        // 7.根据关系变动组装套餐成员
        super.packOfferDetailForOfferInstByRelChgs(instRelChgs);

        // 8.根据变动信息组装套餐账户信息
        super.packageOfferInstAcct(instChgs);
    }

}
